public class Truck extends Automobile {
    //私有属性 车辆类型
    private String Vehicletype;

    //Truck子类构造方法
    public String getVehicletype() {
        return Vehicletype;
    }

    public void setVehicletype(String vehicletype) {
       this.Vehicletype = vehicletype;
    }

    
    //无参构造器
    public Truck(){

    }

    //全参构造器
    public Truck(String brand,String plateNumber,String Vehicletype){
        //调用父类中的方法初始化brand，plateNumber
        super(brand,plateNumber);

        this.Vehicletype=Vehicletype;
    }

     //show方法
     public void show(){
        System.out.println("The brand of the car is: "+getBrand()+",Car license plate is: "+getPlateNumber()+ ",The type of the car is: "+Vehicletype );
    }


    public double getRent(int days) {
        double rent = 0.0;
       switch (Vehicletype) {
        case "minitype":
            rent = 300 * days;
            break;
            case "mindumtype":
            rent = 350 * days;
            break;
            case "large":
            rent = 500 * days;
            break;
        default:
        rent = 9999999999999999999999.99;
            break;
       }
       return rent;
    

    }
    
    
}
